{% extends 'index.html' %}
{% block title %}
	搜索
{% endblock %}
{% block js %}
    <script>
    if({{ page }} === {{ pages }})$('#next').addClass('disabled')
    if({{ page }} === 1)$('#pre').addClass('disabled')
    </script>
{% endblock %}
{% block UD %}
    <div class="m-auto mt-5 w-25">
        <nav class='text-primary' aria-label="Page navigation example">
          <ul class=" pagination">
            <li class="page-item"><a class="page-link" id="pre" href="{% url 'blog:search' %}?key={{ key }}&page={{ page|add:-1}}">上一页</a></li>
            	<li class="page-item m-lg-2" style="line-height: 20px">{{ page }}/{{ pages }}</li>
            <li class="page-item"><a class="page-link" id="next" href="{% url 'blog:search' %}?key={{ key }}&page={{ page|add:1}}">下一页</a></li>
          </ul>
        </nav>
    </div>
{% endblock %}